﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace DockSample.Line
{
    class StartLine : OriginalLine
    {
        public string complexLineId;

        public StartLine(Point point1, Point point2, OriginalDiagram startDiagram, string complexLineId)
            : base(point1, point2)
        {
            this.StartDiagram = startDiagram;
            this.EndDiagram = new NullDiagram();
            this.complexLineId = complexLineId;
            startDiagramSize = new Size(startDiagram.Width / 2, startDiagram.Height / 2);
            endDiagramSize = new Size(endDiagram.Width / 2, endDiagram.Height / 2);
        }

        public StartLine(Point point1, Point point2, string id, OriginalDiagram startDiagram, string complexLineId)
            : base(point1, point2, id)
        {
            this.StartDiagram = startDiagram;
            this.EndDiagram = new NullDiagram();
            this.complexLineId = complexLineId;
            startDiagramSize = new Size(startDiagram.Width / 2, startDiagram.Height / 2);
            endDiagramSize = new Size(endDiagram.Width / 2, endDiagram.Height / 2);
        }
        public override void Drawing(Graphics g, DummyModelForm m)
        {
            this.RefreshRelatedDiagram(this);
            Pen pen = new Pen(Color.Brown, 1);
            g.DrawLine(pen, GetStartShowPoint(), GetEndShowPoint());
        }
    }
}
